
#docker rmi -f nginx:1.21.1
docker pull nginx:1.21.1
rm -rf /cardone/docker/images/nginx_1.21.1.tar
mkdir -p /cardone/docker/images/
docker save nginx:1.21.1 > /cardone/docker/images/nginx_1.21.1.tar
#docker load < /cardone/docker/images/nginx_1.21.1.tar

mkdir -p /cardone/middlewares/nginx/usr/share/nginx/html/rainman-er-mc

docker stack rm cardone-nginx

docker stack deploy -c /cardone/middlewares/nginx/prod.yml cardone-nginx

for i in {1..10}  
do  
sleep $i

docker stack ps cardone-nginx

docker service ls
done

docker service logs cardone-nginx_nginx -f --tail 300
